home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-17 | 2.6 KB | 126 lines | [TEXT/MPS ] |
- {–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
-
- PROJECT: Threads Traffic Simulation
-
- FILE: UApplication.p
-
- LANGUAGE: MPW Pascal (version 3.2)
-
- DESCRIPTION: This is the declaration area for all application variables and constants.
- If possible, no procedures or functions should be put here.
-
- AUTHOR(S): William H. Knott
- Apple Computer
- Cupertino, CA 95014
- AppleLink : KNOTT
-
- VERSION(S): 1.0 13-Oct-91 WHK Brand New Today.
-
- –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––}
-
- UNIT UApplication;
-
- INTERFACE
-
- USES
- MemTypes, QuickDraw, OSIntf, ToolIntf, PackIntf, Traps;
-
-
- TYPE
-
- TrafficLight = RECORD
- lightState : INTEGER;
- phaseTimes : ARRAY[0..3] OF INTEGER; { In Seconds! }
- dispStateChanged : BOOLEAN;
- END;
-
- AutoHandle = ^AutoPtr;
- AutoPtr = ^AutoRec;
- AutoRec = RECORD
- carType : INTEGER;
- direction : INTEGER;
- speed : Real;
- accelleration : Real;
- braking : Real;
- turning : BOOLEAN;
- position : POINT;
- needToRedraw : BOOLEAN;
- recalcCarShape : BOOLEAN;
- carIsDone : BOOLEAN;
- oldTrapAddr : Handle;
- markedForDeath : BOOLEAN;
- END;
-
- AutoListArrayHdl = ^AutoListArrayPtr;
- AutoListArrayPtr = ^AutoListArray;
- AutoListArray = ARRAY[1..MaxInt] OF AutoHandle;
-
-
- CONST
-
- rAboutDlogID = 1024;
- rNotYetImplementedID = 1025;
-
- rNoThreadMgrAlertID = 2048;
-
- kNewWindow = 1024;
-
- rMenuBarID = 1024;
-
- rClipboardWindow = 1000;
-
- rAppleMenuID = 128;
- iAboutItem = 1;
-
- rFileMenuID = 129;
- iFileNewItem = 1;
- iFileOpenItem = 2;
- iFileCloseItem = 4;
- iFileSaveItem = 5;
- iFileSaveAsItem = 6;
- iFileRevertItem = 7;
- iFilePSetupItem = 9;
- iFilePrintItem = 10;
- iFileQuitItem = 12;
-
- rEditMenuID = 130;
- iEditUndoItem = 1;
- iEditCutItem = 3;
- iEditCopyItem = 4;
- iEditPasteItem = 5;
- iEditClearItem = 6;
- iShowClipboard = 8;
-
- rTestMenuID = 131;
- iTest1Item = 1;
- iTest2Item = 2;
- iTest3Item = 3;
- iTest4Item = 4;
- iTest5Item = 5;
-
- kLightState1Time = 1;
- kLightState2Time = 2;
- kLightState3Time = 3;
- kLightState4Time = 4;
- kLightState5Time = 5;
- kLightState6Time = 6;
- kLightState7Time = 7;
- kLightState8Time = 8;
-
- kColorOne = BlueColor;
- kColorTwo = redColor;
- kColorThree = magentaColor;
- kColorFour = GreenColor;
-
-
- VAR
- gIntoCooperativeWind : WindowPtr;
- gClipBoard : WindowPtr;
- gDone : BOOLEAN;
- gAutomobiles : AutoListArrayHdl;
- gTrafficState : TrafficLight;
- gCurrentTime : LONGINT;
-
- IMPLEMENTATION
-
- END.